package cn.xopencode.score.api.enums.training;

import cn.xopencode.common.framework.core.DoubleArrayValuable;

import java.util.Arrays;

/**
 * 参与角色对应分数枚举
 */
public enum RoleScoreEnum implements DoubleArrayValuable {

    TRAINING(2.0, "培训讲师"),
    PARTICIPANT(0.5, "参与人员");

    public static final double[] ARRAYS = Arrays.stream(values()).mapToDouble(RoleScoreEnum::getScore).toArray();

    /**
     *  级别
     */
    private final Double score;
    /**
     * 描述
     */
    private final String name;

    RoleScoreEnum(Double score, String name) {
        this.score = score;
        this.name = name;
    }

    public Double getScore () {
        return this.score;
    }

    public String getName() {
        return name;
    }

    @Override
    public double[] array() {
        return ARRAYS;
    }

}
